package com.foreknow.oppExer1.exer4;

/**
 * @author shkstart
 * @create 2021-07-28 13:50
 */
public class Hero extends  ActionCharacter implements CanSwim,CanFly {
    private String name;

    public Hero(String name) {
        this.name = name;
    }

    @Override
    public void fight(String emp) {
        System.out.println(this.name +"vs"+emp);
    }

    @Override
    public void fly() {
        System.out.println(name+"飞");
    }

    @Override
    public void swim() {
        System.out.println(name+"游泳");
    }
}
